<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" errorPage="/error.jsp" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@page import="com.feib.soeasy.util.UserUtil"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<%@ include file="/includes/taglibs.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<%@ include file="/includes/meta.jsp"%>
	<title>遠東商銀 全方位企業收款服務 || <decorator:title />
	</title>
	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
	<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/default/style.css'/>" />
	<link rel="stylesheet" type="text/css" media="all" href="<c:url value='/styles/default/jquery-ui-1.8.6.custom.css'/>" />
	
	<style type="text/css">
	#loadingScreen {
		background: url(<c:url value="/styles/default/images/busy.gif"/>) no-repeat 5px 8px;
		padding-left: 25px;
	}
	/* hide the close x on the loading screen */
	.loadingScreenWindow .ui-dialog-titlebar-close {
		display: none;
	}
	</style>
	
	<script type="text/javascript" src="<c:url value='/scripts/jquery/jquery-1.4.2.js'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/jquery/jquery-ui-1.8.6.custom.min.js'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/jquery/jquery.ui.datepicker-zh-TW.js'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/loadingScreen.js'/>"></script>
	<script type="text/javascript" src="<c:url value='/scripts/public.js'/>"></script>
	
	
	<script type="text/javascript">
	<!--
	
	<%//by jimmyliu on 20120220
	if (null != UserUtil.getUser()){
	%>
	var sessionTimeout = <%= request.getSession().getMaxInactiveInterval() %>;
	jQuery(window).bind("ajaxComplete", function() {resetPageTimeout(sessionTimeout);});
	// 將相關資料如此宣告以減少 memory leak
	var tConfig = {
       // 彈出即將登出提示的 timer   
       remindTimer:null,
       // 幾秒之後未動作即登出(這是定義值，不因倒數而遞減) , eg: 10*60 
       timeoutTime: sessionTimeout,
       // 開始提示之後幾秒後登出(這是定義值，不因倒數而遞減) 
       countingTime:60,
       // 幾秒之後顯示即將登出提示 (remindTime = timeoutTime - countingTime)
       remindTime:null
    };

    
    /*
     * 執行強制登出
     */
    function doForceLogout() 
    {
        window.onbeforeunload = null;
        window.location = '<c:url value='soeasy_security_logout'/>';
    }
    
    /*
     * 開始TimeOut倒數
     */
    function startPageTimeOutCounting() 
    {
        if(tConfig.remindTimer) clearTimeout(tConfig.remindTimer);
        tConfig.remindTime = tConfig.timeoutTime - tConfig.countingTime;
        tConfig.remindTimer = setTimeout("finalCounting()",tConfig.remindTime*1000);
    }               
    
    /*
     * 重新倒數
     */
    var resumeTimeout = function(win) 
    {
        if(tConfig.remindTimer) clearTimeout(tConfig.remindTimer);
        startPageTimeOutCounting();
        return true;
    };                  
    
    /*
     * 重新設定 Timeout時間為多少秒
     */
    function resetPageTimeout(iTimeoutTime) 
    {
        if( iTimeoutTime ) 
        {
            tConfig.timeoutTime = iTimeoutTime;
            startPageTimeOutCounting();
        }
    }
    
    /*
     * 觸發"即將登出提示"
     */
    function finalCounting() 
    {
        alert('Session Time out. 請重新登入系統！');
        doForceLogout();
    }
    
    resetPageTimeout(sessionTimeout);
    
	<%
	}
	//end by jimmyliu on 20120220
	%>
	
	
	// only ie6 ok.
	window.onunload = function() {		
		<%
		if (null != UserUtil.getUser()){
		%>
		
		if( (event.clientX<0 && event.clientY<0) ||( event.altKey && event.keyCode==115) )
		{
        	document.write('<iframe width="100" height="100" src="<c:url value='soeasy_security_logout'/>"></iframe><OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>');
        	document.all.WebBrowser.ExecWB(45,1);
        }
		<%
		}
		%>
    };
	//-->
	</script>
	
	<decorator:head />
</head>
<body <decorator:getProperty property="body.id" writeEntireProperty="true"/> <decorator:getProperty property="body.class" writeEntireProperty="true"/>>
<div id="container">
	<div id="loadingScreen"></div>

<%
if (null == UserUtil.getUser()){
%>	
	<a href="<c:url value='Login.action'/>" id="btnLogin">登入</a>
<%
}
else
{
%>
	<a href="<c:url value='soeasy_security_logout'/>" id="btnLogout">登出</a>
<%} 
%>
	
	<!-- **************************** header start ********************************* -->
	<div id="header">
		<h1><a href="http://www.feib.com.tw/" target="_blank">遠東商銀</a></h1>
		
		<div id="kvArea">
			<img src="<c:url value='/styles/default/images/headerKV.jpg'/>" title="全方位企業收款服務" />
			<div id="corpName"><% if (null != UserUtil.getUserGroup()) out.println(UserUtil.getUserGroup().getGroupName());%></div>			
			
		</div>
		
		<div id="kvR">
			<ul>
				<!--<li><a href="#">關於全方位企業收款服務</a></li>-->
				<!--<li><a href="#">常見問題</a></li>-->
				<li><a href="mailto:b2bcsr@feib.com.tw">與我連絡</a></li>
			</ul>
			<div id="corpType"><% if (null != UserUtil.getUserName()) out.println(UserUtil.getUserName() +" 您好"); else out.print("繳費客戶 PAYMENT");%>
			</div>
		</div>
		
	</div>
	<!-- **************************** header end ********************************* -->
	
	<div id="body">
	
		<!-- **************************** 左區塊 start ********************************* -->
		<div id="leftArea">
			<jsp:include page="/includes/menubar.jsp"/>
		</div>
		<!-- **************************** 左區塊 end ********************************* -->
		
		<!-- **************************** 主區塊 start ********************************* -->
		<div id="mainArea">
			<decorator:body/>
		</div>
		<!-- **************************** 主區塊 end ********************************* -->
		<div id="forceLogoutMessageDiv" style="display: none;"></div>
	
	</div>
	
	<!-- **************************** footer start ********************************* -->
	<div id="footer">
		<div id="copyrightArea">
			<a id="footerLogo" href="http://www.feib.com.tw/" target="_blank">遠東商銀</a>
			<span id="copyright">版權所有 &copy; 2010 Far Eastern International Bank. All Rights Reserved.</span>
		</div>
		<div id="footerLinks">
			<ul>
				<!--<li><a href="#">網站地圖</a></li>-->
				<!--<li><a href="#">服務條款</a></li>-->
				<li><a href="<c:url value='/question.jsp'/>" >常見問題</a></li>
				<li><a href="<c:url value='/privacy.jsp'/>" >隱私保護</a></li>
				<li><a href="<c:url value='/transSecurity.jsp'/>">交易安全</a></li>
			</ul>
			<span>全方位企業收款服務 客戶服務專線  02-2311-2606 | 02-2311-2609</span>
		</div>
	</div>
	<!-- **************************** footer end ********************************* -->
	
</div><!-- end of #container -->
</body>
</html>
